//
//  TestAlone_1_Controller.m
//  ProjectDemo
//
//  Created by IOS3 on 2018/12/28.
//  Copyright © 2018 IOS3. All rights reserved.
//

#import "TestAlone_1_Controller.h"
#import "EditNoteView.h"

@interface TestAlone_1_Controller ()

@end

@implementation TestAlone_1_Controller

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.view.backgroundColor = UIColor.whiteColor;
    
    
    // EditNoteView *note = [[NSBundle mainBundle] loadNibNamed:@"EditNoteView" owner:nil options:nil].lastObject;
    EditNoteView *note = [EditNoteView createInstance];
    note.frame = CGRectMake(0, 0, SCREEN_WIDTH, 500);
    note.cancelButtonTaped = ^{
        NSLog(@"取消按钮 taped");
    };
    note.deleteButtonTaped = ^{
        NSLog(@"删除按钮 taped");
    };
    note.ensureButtonTaped = ^(NSString * _Nonnull noteText) {
        if (noteText == nil) {
            NSLog(@"noteText is nil");
        }
        NSLog(@"确定按钮 taped, text: %@", noteText);
    };
    
    // note.frame = self.view.frame;
    
    [self.view addSubview:note];
}



@end
